----------------------------------------------------------------------------------------------------------------------------
--    		   _   ___ ___ ___ ___ 
--   		  /_\ | __/ __|_ _/ __|		   -]CobrA[- Server Aqua
--  		 / _ \| _| (_ || |\__ \
-- 		/_/ \_\___\___|___|___/		 DJ-TiBest und Dj Copniker
-- 		AEGIS.lua	1.4
-----------------------------------------------------------------------------------------------------------------------------
-- ==========================================================================================================================
--                             Server Configuration
-- ==========================================================================================================================

XConfig = {

	useExperimentalConfigFile 		= false;
	useCrontabFeature 			= false;
	crontab 				= {};
	logLevelInfoEnabled 			= false;
	logDebugVerbosity 			= 8;
	SSMDebug 				= false;

-- ==========================================================================================================================
--        			ADMIN SECTION
-- ==========================================================================================================================

    	adminMessageDuration 			= 15;
	adminProtectMsg      			= "You cannot kill the administrator %s !";
    	adminModeReminder 			= true;
        adminTag   				= "[ADMIN]";
        
	adminIds 				= {
						  ["102611122"] = true;    -- DJ-TiBest
						  ["134979222"] = true;	   -- Dj Copniker
						  ["225115827"] = true;	   -- Todeskiller
						  };


	useAdminImposterProtectionFeature 	= true;
	adminImposterWarning              	= "Please do not use '%s' anywhere in your name. Thank you!";
	adminImposterWarningInterval      	= 30;

	useAdminSpamFeature 			= false;
	adminSpamDefaultMsg 			= "TESTING & DEBUGGING  -- SERVER WILL BE RESTARTED AS NEEDED";
	adminSpamInterval   			= 20;

    	useAdminImmuneToTeamBalanceFeature 	= true;

-- ==========================================================================================================================
--	  			PREMIUM SECTION
-- ==========================================================================================================================

	premiumIds 				= {
						  ["99999999"] = true;
						  };

	usePremiumImmuneToTeamBalanceFeature 	= true;
	

-- ==========================================================================================================================
-- 	  			CHAT COMMAND SECTION
-- ==========================================================================================================================

	useChatCommands      			= true;

    	useAdminChatCommands 			= true;
	usePremiumChatCommands 			= true; 

    	HideChatCommands     			= true;
    	SendOriginalMsgToAdmins 		= false;

-- ==========================================================================================================================
--        			ANTI-CHEAT SECTION
-- ==========================================================================================================================
    
    	useBanSystem 				= true;
        useIDBans 				= true;
        useIPBans 				= false;
        useDomainBans 				= true;
        notifyBanCheck 				= true;
    
	useAutoMKCFeature  			= true;
	autoMKCthreshold   			= 1;
	autoMKCdelay       			= 1;
	autoMKCcoldTimeout 			= 30;
	autoMKChotTimeout  			= 120;

	AEGISAntiCheat 				= true;
	antiCheatTimer 				= 0.2;
	antiSpeedHackEnabled   			= true;
	speedDebug 				= false;
	normalSpeedThreshold 			= 15;
	speedModeSpeedThreshold 		= 23;
	antiTeleportHackEnabled 		= true;
	teleportDebug 				= false;
	teleportThreshold 			= 100;
	useFreezeHackDetect 			= true;
	weaponPermitFreeze 			= {
		AlienMount         		= true,
		VehicleMOARMounted 		= true,
		VehicleMOAR        		= true,
						  };

-- ==========================================================================================================================
-- 	  			HIGH PING SECTION
-- ==========================================================================================================================

	useHighPingFeature        		= true;
	highPingSamplesToInform   		= 80;
	highPingSamplesToKick     		= 100;
	highPingTimeThreshold    		= 200;
	highPingTotalSamples      		= 120;
	highPingUsePunkbusterKick 		= true;
	highPingWarningMessage    		= "THIS SERVER AUTO-KICKS FOR PINGS ABOVE %d !";
	highPingExceptions        		= {};

-- ==========================================================================================================================
--        			GENERAL SERVER SECTION
-- ==========================================================================================================================

	useHitDebugFeature      		= true;
	skipAutoTurretHits      		= true;
	sendHitDetailsToAdmins  		= true;
	sendHitReportsToPlayers 		= false;

	usePickupDebugFeature 			= false;


	numOvertimePeriods  			= 1;
    	overtimeMinutesToAdd			= 3;

    	forceFullInvulnerabilityTime 		= false;

	CP_SUICIDE            			= 0;
	CP_TEAMKILL            			= -10;
	CP_DEATHEXPERIENCE     			= 0;
	CP_DEATHEXPERIENCE_CAP 			= 0;

	useAlternateLevelRotation 		= false;
	mapAbandonTime 				= 0;
	mapRepeatWhilePopulated 		= false;
	mapPossibleAsNextLevel 			= {};
	mapForceAsNextLevel 			= "";
	maxRepetitionsWhilePopulated 		= 0;

-- ==========================================================================================================================
--        			MAP SECTION 
-- ==========================================================================================================================

        fraglimitIA             		= 0;
        scorelimitTIA           		= 300;
        roundtimeallGamerules   		= 0;

        StandardTIAMaps         		= {"armada","battleground","coast","excavation","graveyard","outpost","peak","quarry","ruins","savanna","steelmill","stranded","terminal","treehouse",};
        StandardPSMaps          		= {"beach","crossroads","desolation","frost","mesa","plantation","refinery","shore","tarmac","training",};

        CustomTIAMaps           		= {};
        CustomPSMaps            		= {};

        CustomMapsAutodownloadURL 		= "http://www.your_downloadlink/";

-- ==========================================================================================================================
--        			WELCOME MESSAGES SECTION
-- ==========================================================================================================================

-- Guest

    	useServerJoinWelcomeMessage 		= true;
    	serverJoinWelcomeMessage    		= "<font color=\"#FF0000\"><b><i>Welcome on </i></b></font><font color=\"#008CFF\"><b><i>-]CobrA[-</i></b></font><font color=\"#0004FF\"><b><i> Gaming Server</i></b></font><font color=\"#008CFF\"><b><i> AIM</i></b></font>";
	serverJoinWelcomeMessageChat 		= "Welcome %s to our Crysis Wars Server!";

    	useServerInfoWelcomeMessage 		= true;
        serverInfoWelcomeMessage 		= "<b><i><font color=\"#ffffff\">Besucht uns auf</font></font><font color=\"#ff0000\"> www.cobra-clan.de</font>";
        serverInfoWelcomeMessageChat 		= "Besucht uns auf www.cobra-clan.de";

-- Premium

    	useServerJoinWelcomeMessagePremium 	= true;
    	serverJoinWelcomeMessagePremium    	= "<font color=\"#FF0000\"><b><i>Welcome on </i></b></font><font color=\"#008CFF\"><b><i>-]CobrA[-</i></b></font><font color=\"#0004FF\"><b><i> Gaming Server</i></b></font><font color=\"#008CFF\"><b><i> AIM</i></b></font>";
	serverJoinWelcomeMessageChatPremium 	= "Welcome back, Premium Member: %s";

    	useServerInfoWelcomeMessagePremium 	= true;
        serverInfoWelcomeMessagePremium 	= "<b><i><font color=\"#ffffff\">Besucht uns auf</font></font><font color=\"#ff0000\"> www.cobra-clan.de</font>";
        serverInfoWelcomeMessageChatPremium 	= "Besucht uns auf www.cobra-clan.de";

-- Admin

    	useServerJoinWelcomeMessageAdmin 	= true;
    	serverJoinWelcomeMessageAdmin    	= "<font color=\"#FF0000\"><b><i>Welcome on </i></b></font><font color=\"#008CFF\"><b><i>-]CobrA[-</i></b></font><font color=\"#0004FF\"><b><i> Gaming Server</i></b></font><font color=\"#008CFF\"><b><i> AIM</i></b></font>";
	serverJoinWelcomeMessageChatAdmin 	= "Welcome back, Administrator: %s";

    	useServerInfoWelcomeMessageAdmin 	= true;
        serverInfoWelcomeMessageAdmin 		= "<b><i><font color=\"#ffffff\">Besucht uns auf</font></font><font color=\"#ff0000\"> www.cobra-clan.de</font>";
        serverInfoWelcomeMessageChatAdmin 	= "Besucht uns auf www.cobra-clan.de";

	additionalEquipmentinPS 		= true;

    	sendWelcomeConsoleMsg 			= false;
		advertisement 			= {};

-- ==========================================================================================================================
--        			SERVER MESSAGES SECTION
-- ==========================================================================================================================

    	ChatEntityName         			= "-]CobrA[- AIM :";
    	sendChatOnXSpawn       			= false;
    	sendChatOnXTeleport    			= false;
    	sendChatOnXAward       			= false;
    	sendChatOnXPunish      			= false;
    	sendChatOnXUnpunish    			= false;
    	sendChatOnXPlayerTeam  			= false;
    	sendChatOnJoinLeave    			= false;
    	sendChatOnRename       			= false;
    	sendChatOnPingKick     			= false;
    	sendChatOnXKick        			= false;
    	sendChatOnXVehicleBoot			= false;
    	sendChatOnXKill        			= false;
    	sendChatOnXSay         			= false;
    	sendMsgOnKick          			= true;
    	sendMsgOnBan           			= false;

	spamDelay          			= 15;
	spamInitialDelay   			= 30;
        spamMessagesunderTimefield 		= true;
	spamMessages 				= {
						   "Teamspeak 3   IP = 85.214.112.171:9987",
						   "Besucht uns auf www.cobra-clan.de",
						   "Wir suchen noch aktive Members, bewerbt euch jetzt !!!",
						   "Tipp !vote kick ein zu einen zu kicken",
                        			  };                         


	usePunkbusterUpdateReminders 		= true;
    	pbUpdateReminderMessage1 		= "";
    	pbUpdateReminderMessage2 		= "";
    	pbUpdateConsoleMessage 			= "";

    	sendMsgOnHeadshot 			= true;
        onHeadshotMsg                           = "<font size=\"30\"><b><font color=\"#FF0000\">!!! </font><font color=\"#FFFFFF\">HEADSHOT</font><font color=\"#FF0000\"> !!!</font>";

-- ==========================================================================================================================
--        			PLAYER NAME SECTION
-- ==========================================================================================================================

        useSanitizeColoredNamesFeature           = true;
	useSanitizeSpaceInNamesFeature           = false;
	useSanitizeAfterNameChangesFeature       = false;

        useFunnyNamesForNomadsFeature            = true;
	useFunnyNamesForCrypticsFeature          = false;
	crypticNameRatio                         = 0.6;
        funnyNames                               = {
    	                                           "www.cobra-clan.de",
                                                   };

-- ==========================================================================================================================
--        			TEAM KILL SECTION
-- ==========================================================================================================================

	punishTKers    				= false;
	adminImmuneToTkPenalty 			= false;
	TKSpreeTime    				= 30;
	TKPunishLimit  				= 3;
	TKPunishTime   				= 2;
	TKPunishReason 				= "Exceeding the TK limit";
	TKKickLimit    				= 10;
	TKKickReason   				= "Excessive TKs";
	TKKickTime     				= 30;

    	showTeamKillWarningMsg 			= true;
    	teamKillWarningMsg     			= "TEAM KILLING IS UNAUTHORIZED! STOP IMMEDIATELY!";

-- ==========================================================================================================================
--        			CHAT TRIGGERS SECTION
-- ==========================================================================================================================

	chatMessagestoHold   			= 30;
	useChatResponses     			= false;


    ChatTriggers = {
        Trigger1 = {
            Triggers = {"Aegis","SSM"},
            Responses = {
            "This server is using Crysis Wars SSM AEGIS!",
            "Visit http://forums.rodsmods.org for more info!",
            },
        },
        Trigger2 = {
            Triggers = {"Admins"},
            Responses = {"Admins are *CHANGEME!*"},
        }
        
    };

	voteTime			=	60;
	votePercentage		=	50;
	timeBetweenVotes    =   300;
	
    	BadWordList 				= {};
    
    	MutedMessage 				= "You are muted";

-- ==========================================================================================================================
--        			FEATURES SECTION
-- ==========================================================================================================================

    	useShareVehicleKillPPFeature 		= false;
    	killerSharedAmount           		= 1.0;
    	supporterSharedAmount        		= 0.25;
    	useSeatLockFeature           		= false;
    	allowWeaponsToFreezeVehicles 		= true;
    	vehicleAbandonTime           		= 10;

    	useVulnerableTurretsFeature		= false;
    	useResurrectTurretsFeature  		= false;
    	repairDamagedTurretRate     		= 1;
    	repairResurrectedTurretRate 		= 5;
    	resurrectTurretDelay        		= 1200;

    	useCareerPointsCapFeature     		= false;
	careerPointsCap               		= 750;
	useDefendBunkersFeature       		= false;
	useDefendEnergyPointsFeature  		= false;
    	useSendKDRToPlayerFeature     		= false;

    	useStartingAverageRankFeature 		= false;
   	maximumStartingAverageRank    		= 3;
    	usePersistantScores           		= true;
    
    	useKillStreakFeature 			= true;
    	LogKillStreaks 				= true;
    	useBetterSafeThanSorryFeature 		= true;

-- ==========================================================================================================================
--        			WEAPONS / DAMAGE SECTION
-- ==========================================================================================================================

    	useModifiedWeaponDamageToPlayerFeature  = false;
	useModifiedWeaponDamageToVehicleFeature = false;

	initialPlayerEquipment = {"SOCOM",};

}; -- XConfig

-- ADD ANY FUNCTIONS AFTER THIS LINE! INCLUDING XSETUP, AND CUSTOM COMMAND FUNCTIONS!

-- =============================================================================
-- Function: XDealWithHacker
--
-- This function is called whenever a hack detection is made.
-- The function is the only thing that will determine what is done with a hacker
-- Input, is the player data, and the hack they used in string format. You can
-- configure different hacks to be responded to in a different way, based on the
-- hack parameter. A few helpful examples are given here for punishments.
--
-- \param[in] player
-- The object of the player.
--
-- \param[in] hack
-- String description of the hack
--
--
-- =============================================================================

-- New Hack detections! Hack==
--SPOOFED RENAME REQUEST
--SPOOFED CHAT MESSAGE
--SPOOFED RADIO MESSAGE
--SPOOFED TEAM CHANGE REQUEST
--SPOOFED SPECTATOR MODE REQUEST
--SPOOFED HIT REQUEST

function XDealWithHacker(player, hack)
	if (player) then
		LogAdmins("[AEGIS] Hack Detected: %q detected with %s",player:GetName(), hack);
	end

	if(hack == "SPOOFED RENAME REQUEST") then
		--do with your cheater here as you see fit
        XBan(player:GetName(), hack)
	end
	if(hack == "SPOOFED CHAT MESSAGE") then
		--do with your cheater here as you see fit
        XBan(player:GetName(), hack)
	end
	if(hack == "SPOOFED RADIO MESSAGE") then
		--do with your cheater here as you see fit
        XBan(player:GetName(), hack)
	end
	if(hack == "SPOOFED TEAM CHANGE REQUEST") then
		--do with your cheater here as you see fit
        XBan(player:GetName(), hack)
	end
	if(hack == "SPOOFED SPECTATOR MODE REQUEST") then
		--do with your cheater here as you see fit
        XBan(player:GetName(), hack)
	end
	if(hack == "SPOOFED HIT REQUEST") then
		--do with your cheater here as you see fit
        XBan(player:GetName(), hack)
	end
	if(hack == "HIT HACK") then
        --do with your cheater here as you see fit
        LogAlways("Hit Hack Detected");
    end
end

function XOnPlayerSwear(player, msg)
    XSendChatToTarget(nil, player, "Please Do Not Swear");
end


-- ===============================================
-- Initial Player Equipment
-- ===============================================
-- This can be customised to whatever you want. But it MUST be the exact name!
-- You can find a list of entity names in GameData.pak/Scripts/Entities/Items/XML/

-- If you do not wish to use the Premium equips, simply set them to the same values as the standard one.

-- Admin player get Premium equipment


-- InstantAction
-- ===============================================
XSetup.InstantAction.unknown.initialPlayerEquipment = {
        "Parachute","Binoculars","NightVision","FragGrenade","FragGrenade","LAMRifle","SCAR",

};


XSetup.InstantAction.unknown.initialPlayerEquipmentPremium = {
	"Parachute","Binoculars","NightVision","FragGrenade","FragGrenade","LAMRifle","SCAR",

};

-- TeamInstantAction
-- ===============================================
XSetup.TeamInstantAction.unknown.initialPlayerEquipment = {
        "Parachute","Binoculars","NightVision","FragGrenade","FragGrenade","LAMRifle","SCAR",
};


XSetup.TeamInstantAction.unknown.initialPlayerEquipmentPremium = {
	"Parachute","Binoculars","NightVision","FragGrenade","FragGrenade","LAMRifle","SCAR",
};

-- PowerStruggle
-- ===============================================
XSetup.PowerStruggle.unknown.initialPlayerEquipment = {
        "Parachute","Binoculars","NightVision","FragGrenade","FragGrenade","LAMRifle","SCAR",
};


XSetup.PowerStruggle.unknown.initialPlayerEquipmentPremium = {
	"Parachute","Binoculars","NightVision","FragGrenade","FragGrenade","LAMRifle","SCAR",
};


-- ADD ANY FUNCTIONS BEFORE THIS LINE! INCLUDING XSETUP, AND CUSTOM COMMAND FUNCTIONS!
-- ===============================================
-- Configuration Validation Marker
-- ===============================================
-- leave the following setting as is and don't add
-- any configuration after it. It is used as a
-- marker, that the configuration was loaded
-- successfully and completely.
XConfig.validConfiguration = true;
